package com.example.elasticsearchdemo.dao;

import com.example.elasticsearchdemo.pojo.Entry;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.stereotype.Repository;

@Repository
public class EntrySearchDaoImpl implements CommonElasticsearchOperations<Entry>{

    private ElasticsearchOperations elasticsearchOperations;

    public EntrySearchDaoImpl(ElasticsearchOperations elasticsearchOperations) {
        this.elasticsearchOperations = elasticsearchOperations;
    }

    @Override
    public ElasticsearchOperations elasticsearchOperations() {
        return elasticsearchOperations;
    }

    @Override
    public Class<Entry> type() {
        return Entry.class;
    }
}
